package tr.edu.ege.kipler.satisfiability.profile;

import tr.edu.ege.kipler.satisfiability.Reasoner;
import tr.edu.ege.kipler.satisfiability.completion.CompletionStrategy;
import tr.edu.ege.kipler.satisfiability.completion.SHOIQBasicCompletionStrategy;
import tr.edu.ege.kipler.satisfiability.container.creational.SHOIQModifiedIndividualListWcsFactory;
import tr.edu.ege.kipler.satisfiability.container.creational.WcsFactory;
import tr.edu.ege.kipler.satisfiability.syntactical.SHOIQPreprocessingStrategy;
import tr.edu.ege.kipler.satisfiability.syntactical.SyntacticalProcessingStrategy;

/**
 * 
 * @author İnanç Seylan
 *
 */
public class SHOIQReasoningProfile implements ReasoningProfile {

	private CompletionStrategy completionStrategy;

	private SyntacticalProcessingStrategy preprocessingStrategy;

	private boolean logging;

	private boolean backjumping;

	public SHOIQReasoningProfile(Reasoner reasoner) {
		completionStrategy = new SHOIQBasicCompletionStrategy(reasoner);
		preprocessingStrategy = new SHOIQPreprocessingStrategy(reasoner);
		backjumping = true;
	}

	public CompletionStrategy getCompletionStrategy() {
		return completionStrategy;
	}

	public SyntacticalProcessingStrategy getPreprocessingStrategy() {
		return preprocessingStrategy;
	}

	public String getIdentifier() {
		return "SHOIQ";
	}

	public SHOIQReasoningProfile toggleLogging() {
		logging = !logging;
		return this;
	}

	public boolean isLoggingEnabled() {
		return logging;
	}

	public WcsFactory getWcsFactory() {
		return new SHOIQModifiedIndividualListWcsFactory();
	}

	public boolean isBackjumpingEnabled() {
		return backjumping;
	}

	public SHOIQReasoningProfile toggleBackjumping() {
		backjumping = !backjumping;
		return this;
	}

}
